/**
 * 公用参数
 */

var region=''; //地区
var offices='';//科室
var sel='';//是否选择医生
/**
 * 默认加载
 * @type {{init: Window.process.init, public: Window.process.public}}
 */
window.process = {
    init: function () {
        this.initData();
        this.public();
    },
    initData:function () {
        var paramsData = getUrlParamsCode();
        region= paramsData['region'];
        offices= paramsData['offices'];
        sel= paramsData['sel'];
        if(region){
          $('#region span').html(region);
        }
        if(offices){
          $('#offices span').html(offices);
        }
        
    },
    public: function () {
        //地区选择
        $('#region').click(function () {
            window.location.href='../inquiryOnline/region.html';
        });

        //科室选择
        $('#offices').click(function () {
            window.location.href='../inquiryOnline/offices.html';
        });

        //跳转详情
        $('.main').on('click','.list .item',function () {
            var name=$(this).attr('data-name')
            if(sel){
               window.location.href='../inquiryOnline/report.html?doctor='+name;
            }else{
                window.location.href='../inquiryOnline/detail.html';
            }
        });

    }
};

/**
 * 启动方法执行
 */
process.init();



